package com.atguigu.spring6iocxml.iocscope;

import org.junit.jupiter.api.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestOrder {

    @Test
    public void testOrder() {
        ApplicationContext context = new ClassPathXmlApplicationContext("beanIocscope.xml");
        Order order = context.getBean("order", Order.class);
        System.out.println(order);
        Order order2 = context.getBean("order", Order.class);
        System.out.println(order2);

        Order order21 = context.getBean("order2", Order.class);
        System.out.println(order21);
        Order order22 = context.getBean("order2", Order.class);
        System.out.println(order22);
    }
}
